package com.xmy.cultivate.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xmy.cultivate.entity.MobileStaffPermission;
import com.xmy.cultivate.mapper.MobileRolePermissionMapper;
import com.xmy.cultivate.mapper.MobileStaffPermissionMapper;
import com.xmy.cultivate.service.IMobileStaffPermissionService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 员工权限 服务实现类
 * </p>
 *
 * @author hpiggy
 * @since 2024-06-26
 */
@Service
public class MobileStaffPermissionServiceImpl extends ServiceImpl<MobileStaffPermissionMapper, MobileStaffPermission> implements IMobileStaffPermissionService {
    @Autowired
    MobileStaffPermissionMapper mobileStaffPermissionMapper;

    @Autowired
    MobileRolePermissionMapper mobileRolePermissionMapper;


    @Override
    public List<String> getPermissionCodeAll(@Param("type") Integer type){
        return mobileStaffPermissionMapper.getPermissionCodeAll(type);
    }

    @Override
    public List<String> getStaffPermissionAllByStaffId(Long staffId,Integer type) {
        return mobileStaffPermissionMapper.getStaffPermissionAllByStaffId(staffId,type);
    }

    @Override
    public List<Long> getStaffPermissionAllIdByStaffId(Long staffId, Integer type) {
        return mobileStaffPermissionMapper.getStaffPermissionAllIdByStaffId(staffId,type);
    }
}
